/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.yonsei.iwb.sdt.ontology;

import com.hp.hpl.jena.rdf.model.Model;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Vector;

/**
 *
 * @author JDK
 */
public class ClassModel extends Hashtable<String, UnitClassModel> {
    Hashtable<String, Vector<String>> conClassTable = new Hashtable();
    
    private String contractClass = "http://purl.org/procurement/public-contracts#Contract";
    private String tenderDeadPropD ="http://purl.org/procurement/public-contracts#tenderDeadline";
    private String kindPropD = "http://purl.org/procurement/public-contracts#kind";
    private String contracAuthPropD = "http://purl.org/procurement/public-contracts#contractingAuthority";
    private String locationPropO = "http://purl.org/procurement/public-contracts#location";
    private String mainObjectPropO = "http://purl.org/procurement/public-contracts#mainObject";
    
    private String bussEntiClass = "http://purl.org/goodrelations/v1#BusinessEntity";
    private String placeClass = "http://schema.org/Place";
    private String addressPropO = "http://schema.org/address";
    private String suborgani = "http://www.w3.org/ns/org#subOrganizationOf";
    
    private String postalAddrClass = "http://schema.org/PostalAddress";
    private String addressRegion = "http://schema.org/addressRegion";
    private String addressLocality = "http://schema.org/addressLocality";
    private String addressCountry = "http://schema.org/addressCountry";
    
    
    private String conceptClass ="http://www.w3.org/2004/02/skos/core#Concept";    
    private String notationPropD = "http://www.w3.org/2004/02/skos/core#notation";
    private String profLPropD = "http://www.w3.org/2004/02/skos/core#prefLabel";    
    private String inschemePropD = "http://www.w3.org/2004/02/skos/core#inScheme";
        
    private String counName = "http://schema.org/name";

    
        
    public void classModelMaker() {
//        Vector<String> locset = new Vector();
//        locset.add(placeClass);
//        conClassTable.put(locationPropO, locset);
//        
//        Vector<String> addset = new Vector();
//        addset.add(postalAddrClass);
//        conClassTable.put(addressPropO, addset);
//        
//        Vector<String> moset = new Vector();
//        moset.add(conceptClass);
//        conClassTable.put(mainObjectPropO, moset);
//        
//        Vector<String> buset = new Vector();
//        buset.add(bussEntiClass);
//        conClassTable.put(suborgani, buset);
//        
//        Vector<String> conset = new Vector();
//        conset.add(bussEntiClass);
//        conClassTable.put(contracAuthPropD, conset);
//                
//        UnitClassModel ucm1 = new UnitClassModel(this.contractClass,0);
//        ucm1.addDatatypeProperty(tenderDeadPropD);
//        ucm1.addDatatypeProperty(kindPropD);
//        ucm1.addDatatypeProperty(contracAuthPropD);
//        ucm1.addObjectProperty(locationPropO, true);
//        ucm1.addObjectProperty(mainObjectPropO, true);
//        ucm1.addObjectProperty(contracAuthPropD, true);
//        
//        UnitClassModel ucm2 = new UnitClassModel(this.placeClass,0);
//        ucm2.addObjectProperty(addressPropO, true);
//        
//        UnitClassModel ucm5 = new UnitClassModel(this.bussEntiClass,0);
//        ucm5.addObjectProperty(addressPropO, true);
//        ucm5.addObjectProperty(suborgani, true);
//        
//        
//        UnitClassModel ucm3 = new UnitClassModel(this.postalAddrClass,0);
//        ucm3.addDatatypeProperty(addressRegion);
//        ucm3.addDatatypeProperty(addressLocality);
//        ucm3.addDatatypeProperty(addressCountry);
//        
//        UnitClassModel ucm4 = new UnitClassModel(this.conceptClass,0);
//        ucm4.addDatatypeProperty(notationPropD);
//        ucm4.addDatatypeProperty(profLPropD);
//        ucm4.addDatatypeProperty(inschemePropD);
//        
//        this.put(contractClass, ucm1);
//        this.put(placeClass, ucm2);
//        this.put(postalAddrClass, ucm3);
//        this.put(conceptClass, ucm4);
//        this.put(bussEntiClass, ucm5);
//                
    }
    
    public Vector<String> getConnectedClass(String property){
        return this.conClassTable.get(property);
    }

  

    public void printClassModel() {
        for (int i = 0; i < this.size(); i++) {
//            System.out.println("======================================");
            UnitClassModel ucm = this.get(i);
            ucm.printUnitClassModel();
//            System.out.println("======================================");
        }
    }
}

